package cn.org.xwb.bookmall.model.vo;


import cn.org.xwb.bookmall.model.constant.ProductConst;
import cn.org.xwb.bookmall.model.po.ProductCategorySub;
import cn.org.xwb.common.encrypt.annotation.rsa.RsaDe;
import cn.org.xwb.common.valid.annotation.str.StrMaxLen;
import cn.org.xwb.common.valid.annotation.str.StrNotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;

@AllArgsConstructor
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@JsonIgnoreProperties(value = "handler")
public class ProductCategoryVo implements Serializable {

    @StrNotNull
    @RsaDe
    private String account;

    /**
     * 商品分类 id
     */
    private Long id;

    /**
     * 商品分类名称
     */
    @StrNotNull
    @RsaDe
    @StrMaxLen(ProductConst.PRODUCT_CATEGORY_NAME_MAX_LEN)
    private String name;

    /**
     * 商品分类编码
     */
    @StrNotNull
    @RsaDe
    @StrMaxLen(ProductConst.PRODUCT_CATEGORY_CODE_MAX_LEN)
    private String code;

    /**
     * 商品分类描述
     */
    @RsaDe
    @StrMaxLen(ProductConst.PRODUCT_CATEGORY_DESC_MAX_LEN)
    private String description;

    /**
     * 该商品分类是否禁用
     */
    private Boolean disabled;

    /**
     * 二级商品分类
     */
    ArrayList<ProductCategorySub> subs;

}
